package com.ruoyi.xh.service.impl;

import java.util.stream.Collectors;
import java.util.stream.Stream;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.transaction.annotation.Transactional;
import com.ruoyi.xh.mapper.XhSystemMenuAuthMapper;
import com.ruoyi.xh.domain.XhSystemMenuAuth;
import com.ruoyi.xh.service.IXhSystemMenuAuthService;

/**
 * 权限Service业务层处理
 * 
 * @author songjw
 * @date 2024-12-13
 */
@Service
public class XhSystemMenuAuthServiceImpl extends ServiceImpl<XhSystemMenuAuthMapper,XhSystemMenuAuth> implements IXhSystemMenuAuthService {

    /**
     * 查询权限
     * 
     * @param id 权限主键
     * @return 权限
     */
    @Override
    public XhSystemMenuAuth selectXhSystemMenuAuthById(Long id)
    {
        return this.getById(id);
    }

    /**
     * 查询权限列表
     * 
     * @param xhSystemMenuAuth 权限
     * @return 权限
     */
    @Override
    public Page<XhSystemMenuAuth> selectXhSystemMenuAuthList(XhSystemMenuAuth xhSystemMenuAuth)
    {
        return new Page<>();
    }

    /**
     * 新增权限
     * 
     * @param xhSystemMenuAuth 权限
     *
     */
    @Override
    public void insertXhSystemMenuAuth(XhSystemMenuAuth xhSystemMenuAuth)
    {
        this.save(xhSystemMenuAuth);
    }

    /**
     * 修改权限
     * 
     * @param xhSystemMenuAuth 权限
     *
     */
    @Override
    public void updateXhSystemMenuAuth(XhSystemMenuAuth xhSystemMenuAuth)
    {
        this.updateById(xhSystemMenuAuth);
    }

    /**
     * 批量删除权限
     * 
     * @param ids 需要删除的权限主键
     *
     */
    @Override
    @Transactional(rollbackFor = Exception.class)
    public void deleteXhSystemMenuAuthByIds(Long[] ids)
    {
        this.removeByIds(Stream.of(ids).collect(Collectors.toSet()));
    }
}
